package com.lcx.movie.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lcx.movie.entity.MovieDetail;
import com.lcx.movie.mapper.MovieDetailMapper;
import com.lcx.movie.service.MovieDetailService;
import org.apache.ibatis.annotations.Param;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 李丽君
 * @version 1.0
 * @Description 电梯海报信息实体
 * @date 2025/2/21 9:54
 */
@Service
public class MovieDetailServiceImpl extends ServiceImpl<MovieDetailMapper, MovieDetail> implements MovieDetailService {
    @Autowired
    private MovieDetailMapper movieDetailMapper;

    /**
     * 新增电影海报
     * @param movieslist 电影集合
     * @return 受影响的行数
     */
    @Override
    public int addImgList(List<MovieDetail> movieslist) {
        return movieDetailMapper.addImgList(movieslist);
    }

    /**
     * 删除电影海报
     * @param detailId 电影海报id
     * @return 受影响的行数
     */
    @Override
    public int deleteImg(int detailId) {
        return movieDetailMapper.deleteImg(detailId);
    }

    /**
     * 根据电影id查询出多张电影海报
     * @param movieId 电影id
     * @return 查出的电影海报集合
     */
    @Override
    public List<MovieDetail> findManyImgs(int movieId){
        return movieDetailMapper.findManyImgs(movieId);
    }
}
